<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>首页</title>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="all"/>
<link rel="stylesheet" type="text/css" href="css/style2.css" />
<link rel="stylesheet" type="text/css" href="css/mystyle.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />

<!-- Custom Theme files -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!--fonts start-->
<link href='http://fonts.useso.com/css?family=Ruluko' rel='stylesheet' type='text/css'>
<link href='http://fonts.useso.com/css?family=Work+Sans:400,600,500,700,800,900,200,300' rel='stylesheet' type='text/css'>
<!--//fonts-->
<script type="text/javascript" src="js/jquery.js"></script>
</head>
<body>
<!--horizan start here-->
<div class="top-navg ">
	<div class="container">
		<div class=" logo wow tada" data-wow-delay="0.3s">
			<a href="index.jsp"><img src="images/flower5.png" alt="" width="244px" height="40px"></a>
		</div>
		<div class="navigation">	
			<span class="menu-ic"><img src="images/menu2.png" alt=""></span>
			<div class="menu menu-li">
				<ul class="menu-list">
					<li class="menu-item menu-item-current"><a href="index.jsp" class="menu-link">首页</a></li>
					<li class="menu-item"><a href=# class="menu-link">关于</a></li>
					<li class="menu-item"><a href=# class="menu-link">联系我</a></li>
				</ul>
			</div>

			 <script>
				   $( "span.menu-ic" ).click(function() {
					 $( ".navigation ul" ).slideToggle( 300, function() {
					 // Animation complete.slideToggle是jquery动画效果，点击隐藏。好像没有效果。
					  });
					 });
				</script>
	</div>
	<ul class="nav navbar-nav navbar-right" >
				 		<li><a href="#"><span > 登录</span></a></li>
				 		<li><a href="#"><span > 注册</span></a></li>
				 		<li><a href="logout.action"><span > 退出</span></a></li>
	</ul>
	<div class="clearfix"></div>
</div>
</div>
<!--mother grid start here-->

<div class="main-grid-one1"  id="one">
    <div class="home-banner">
		<div class="dream-home-bann-main wow bounceInDown" data-wow-delay="0.3s">
				<h1>Dream for you!</h1>
				<span class="span-dream-bar"> </span>
				<p>Whatever is worth doing is worth doing well.</p>
		</div>
    </div>
<!--furniture-->
	<div class="furniture">
		<div class="container">

			<div class="furniture-main">
				<div class="col-md-4 furniture-grid wow bounceInLeft" data-wow-delay="0.3s">
					<figure>
						<img src="images/r1.jpg" alt="" class="img_responsive">
					</figure>
					<h4><a href="single.html">Take a trivial example </a></h4>
					<p>But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account.</p>
					
				</div>
				<div class="col-md-4 furniture-grid wow bounceInUp" data-wow-delay="0.3s">
					<figure>
						<img src="images/r2.jpg" alt="" class="img_responsive">
					</figure>
					<h4><a href="single.html">Take a trivial example </a></h4>
					<p>But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account.</p>
				</div>
				<div class="col-md-4 furniture-grid no-marg wow bounceInRight" data-wow-delay="0.3s">
					<div class="furni-small-grid">
					   <div class="furnitu-left">
					  	  <a href="single.html"><img src="images/s1.jpg" alt="" class="img-responsive"></a>
					   </div>
					   <div class="furnitu-right">
					  	  <h5><a href="single.html">These cases are perfectly</a></h5>
					  	  <p>On the other hand, we denounce with righteous indignation</p>
					   </div>
					 <div class="clearfix"> </div>
					</div>
					<div class="furni-small-grid">
					   <div class="furnitu-left">
					  	  <a href="single.html"><img src="images/s2.jpg" alt="" class="img-responsive"></a>
					   </div>
					   <div class="furnitu-right">
					  	  <h5><a href="single.html">These cases are perfectly</a></h5>
					  	  <p>On the other hand, we denounce with righteous indignation</p>
					   </div>
					 <div class="clearfix"> </div>
					</div>
					<div class="furni-small-grid">
					   <div class="furnitu-left">
					  	  <a href="single.html"><img src="images/s3.jpg" alt="" class="img-responsive"></a>
					   </div>
					   <div class="furnitu-right">
					  	  <h5><a href="single.html">These cases are perfectly</a></h5>
					  	  <p>On the other hand, we denounce with righteous indignation</p>
					   </div>
					 <div class="clearfix"> </div>
					</div>
					<div class="furni-small-grid">
					   <div class="furnitu-left">
					  	 <a href="single.html"> <img src="images/s4.jpg" alt="" class="img-responsive"></a>
					   </div>
					   <div class="furnitu-right">
					  	  <h5><a href="single.html">These cases are perfectly</a></h5>
					  	  <p>On the other hand, we denounce with righteous indignation</p>
					   </div>
					 <div class="clearfix"> </div>
					</div>
				</div>
			 <div class="clearfix"> </div>
			</div>
		</div>
	</div>
<!--promiss-->
	<div class="promiss">
		<div class="container">
			<div class="promiss-main wow bounceInDown" data-wow-delay="0.3s">
				<h3>song for life</h3>
				<p>Life is a journey, not the destination, but the scenery along the should be and the mood at the view.</p>
			</div>
		</div>
	</div>
<!--footer end here-->
    <div class="footer">
		<div class="container">
			<div class="footer-main">
			<div class="col-md-4 amet-sed wow bounceInDown" data-wow-delay="0.3s">
				<h4>Information</h4>
				<p>I do this site is purely for fun, as well as learning.At present, there is no good specific features.</p>
				<ul class="social">
					<li><span> </span>Wuhan in China</li>
					<li class="phone"><span> </span> 13628641003</li>
					<li class="mail"><a href="369771187@qq.com"><span> </span> 369771187@qq.com</a></li>
				</ul>
				</div>
				 
				 <div class="col-md-5 ftr-grid wow bounceInUp" data-wow-delay="0.3s">
				 	<h4>Newsletter</h4>
				 	<form>
				 		<input type="text"  placeholder="Email Address" required="">
				 		<input type="submit" value="subscribe">
			 	</form>
				 </div>
				 <div class="col-md-3 amet-sed wow bounceInLeft" data-wow-delay="0.3s">
				<h4>信息</h4>
				<p>做这个网站纯粹是为了好玩。目前还没有想好功能。</p>
				<ul class="social">
					<li><span> </span>武汉</li>
					<li class="phone"><span> </span> 13628641003</li>
					<li class="mail"><a href="369771187@qq.com"><span> </span> 369771187@qq.com</a></li>
				</ul>
				</div>
			 <div class="clearfix"> </div>
			</div>
		</div>
    </div>
    <div class="copy-right wow shake" data-wow-delay="0.3s">
    	 <p>Copyright &copy; 2016.Company name All rights reserved.<a target="_blank" href=javascripte:void(0)>for study.</a></p>
    </div>
</div>

<!--modal start  -->
<div class="modal" id="mymodal">
    <div class="modal-dialog">
        <div class="modal-content" style="width:65%">
    		<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
				<h3 class="modal-title1">请填写您的信息</h3>
			</div>
			<div class="modal-body">
				<form class="form-horizontal" id="myform">
				  <fieldset>
				          <div class="control-group">
				                <label class="control-label pos" for="input01">&nbsp&nbsp昵称&nbsp&nbsp&nbsp</label>
				                     <div class="controls pos">
				                             <input type="text" class="input-xlarge form-control" id="input01">                     
                                   	 </div>
                                   	 <div class="pos pos1"><span class="glyphicon glyphicon-remove"></span>  昵称已被注册</div>
				          </div>
				          <div class="control-group" style="clear:both;padding-top:30px">
				                <label class="control-label pos" for="input01">&nbsp&nbsp密码&nbsp&nbsp&nbsp</label>
				                      <div class="controls pos">
				                              <input type="text" class="input-xlarge form-control" id="input01">				                                   
				                      </div>
				          </div>
				          
				          
				   </fieldset>
				 </form>
				
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				<button type="button" class="btn btn-primary">注册</button>
			</div>
		</div>
	</div>
</div>

<div class="modal" id="mymodal2">
    <div class="modal-dialog">
        <div class="modal-content" style="width:65%">
    		<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
				<h3 class="modal-title1">登录</h3>
			</div>
			<div class="modal-body">
				<form class="form-horizontal" id="myform">
				  <fieldset>
				          <div class="control-group">
				                <label class="control-label pos" for="input01">&nbsp&nbsp昵称&nbsp&nbsp&nbsp</label>
				                     <div class="controls pos">
				                             <input type="text" class="input-xlarge form-control" id="input01">                     
                                   	 </div>
				          </div>
				          <div class="control-group" style="clear:both;padding-top:30px">
				                <label class="control-label pos" for="input01">&nbsp&nbsp密码&nbsp&nbsp&nbsp</label>
				                      <div class="controls pos">
				                              <input type="text" class="input-xlarge form-control" id="input01">				                                   
				                      </div>
				          </div>
				          
				          
				   </fieldset>
				 </form>
				
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				<button type="button" class="btn btn-primary">登录</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->


<!-- <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> 
 -->
<script type="text/javascript" src="js/jquery1.js"></script><!--没这个js就弹不出来  -->
<script type="text/javascript" src="js/user/bootstrap.min.js"></script>
 
<script type="text/javascript" >
 $(function(){
  $(".top-navg .container .nav li:eq(1)").click(function(){
  $("#mymodal .modal-body .control-group:eq(0) .pos1").css("display","none");
    $("#mymodal").modal("toggle");
  });
});
$("#mymodal button:last").click(function(){
var name=$("#mymodal input:first").val();
var pw=$("#mymodal input:last").val();
$.ajax({
type:"post",
dataType:"json",
url:"register",
data:{"username":name,"password":pw},
success:function(json){
if(json.status=="success"){
$("#mymodal").modal("hide");
alert("注册成功！");
}else{
$("#mymodal .modal-body .control-group:eq(0) .pos1").css("display","block");
};
}
});
});


$(function(){
  $(".top-navg .container .nav li:eq(0)").click(function(){
    $("#mymodal2").modal("toggle");
  });
});
$("#mymodal2 button:last").click(function(){
var name=$("#mymodal2 input:first").val();
var pw=$("#mymodal2 input:last").val();
$.ajax({
type:"post",
dataType:"json",
url:"login",
data:{"username":name,"password":pw},
success:function(json){
$("#mymodal2").modal("hide");
if(json.status=="游客"){
	alert("登录失败！");
}else if(json.status=="error"){
	alert("您已登录！");
}else{
window.location.href="content/content.jsp";
}
}
});
});

</script>
	
	<!--model end  -->


<!-- animated-css -->
		<link href="css/animate.css" rel="stylesheet" type="text/css" media="all">
		<script src="js/wow.min.js"></script>
		<script>
		 new WOW().init();
		</script>
<!-- animated-css -->
</html>
